import 'package:flutter/material.dart';
import 'package:hello_flutter/base/index.dart';

class ContainerIndexWidget extends BasePage {
  const ContainerIndexWidget({super.key});

  @override
  String getPageTitle() => '容器类组件';

  @override
  Widget buildBody(BuildContext context) => SingleChildScrollView(
        padding: const EdgeInsets.all(16),
        child: Center(
          child: Column(
            mainAxisAlignment: MainAxisAlignment.center,
            children: [
              ElevatedButton(
                onPressed: () => Navigator.of(context).pushNamed('/container/padding'),
                child: const Text('Padding'),
              ),
              ElevatedButton(
                onPressed: () => Navigator.of(context).pushNamed('/container/decorated_box'),
                child: const Text('DecoratedBox'),
              ),
              ElevatedButton(
                onPressed: () => Navigator.of(context).pushNamed('/container/transform'),
                child: const Text('Transform'),
              ),
              ElevatedButton(
                onPressed: () => Navigator.of(context).pushNamed('/container/container'),
                child: const Text('Container'),
              ),
              ElevatedButton(
                onPressed: () => Navigator.of(context).pushNamed('/container/clip'),
                child: const Text('Clip'),
              ),
              ElevatedButton(
                onPressed: () => Navigator.of(context).pushNamed('/container/fitted_box'),
                child: const Text('FittedBox'),
              ),
              ElevatedButton(
                onPressed: () => Navigator.of(context).pushNamed('/container/scaffold'),
                child: const Text('Scaffold'),
              ),
            ],
          ),
        ),
      );
}
